package com.autumn.zero.workflow.application.dto.user.task;

import java.io.Serializable;

import javax.validation.constraints.NotNull;

import com.autumn.common.api.application.DataValidation;
import com.autumn.validation.ValidationUtils;
import com.autumn.validation.annotation.NotNullOrBlank;

/**
 * 用户处理任务输入
 * 
 * @author 杨昌国 2019-02-20 18:27:40
 */
public class UserTaskCompleteInput implements DataValidation, Serializable {

	/**
	 * 
	 */
	private static final long serialVersionUID = -4647334420003964754L;

	/**
	 * 任务
	 */
	@NotNullOrBlank(message = "任务id不能为空")
	private String taskId;

	/**
	 * 任务结果 {@link com.autumn.zero.workflow.constants.ProcessTaskConstants}
	 */
	@NotNull(message = "任务结果不能为空。")
	private Integer taskResult;

	/**
	 * 任务意见
	 */
	private String taskOpinion;

	/**
	 * 获取任务id
	 * 
	 * @return
	 */
	public String getTaskId() {
		return taskId;
	}

	/**
	 * 设置任务id
	 * 
	 * @param taskId
	 */
	public void setTaskId(String taskId) {
		this.taskId = taskId;
	}

	/**
	 * 
	 * @return {@link com.autumn.zero.workflow.constants.ProcessTaskConstants}
	 */
	public Integer getTaskResult() {
		return taskResult;
	}

	/**
	 * 
	 * @param taskResult {@link com.autumn.zero.workflow.constants.ProcessTaskConstants}
	 */
	public void setTaskResult(Integer taskResult) {
		this.taskResult = taskResult;
	}

	public String getTaskOpinion() {
		return taskOpinion;
	}

	public void setTaskOpinion(String taskOpinion) {
		this.taskOpinion = taskOpinion;
	}

	@Override
	public void valid() {
		ValidationUtils.validation(this);
	}
}
